/**
 * Created by IntelliJ IDEA.
 * User: Bezdelnick
 * Date: 12.09.12
 * Time: 10:15
 * To change this template use File | Settings | File Templates.
 */
package fgui.content {
import fgui.GuiComponent;

import flash.geom.Point;
import flash.text.TextField;

public class TextContainer extends GuiComponent {
    private var textField:TextField;

    public function TextContainer(coordinate:Point, size:Point, src:String) {
        super(coordinate, size);

        renderColor = 0xeeeeee;
        renderAlpha = 1;
        renderDefault();

        textField = new TextField();
        textField.wordWrap = true;
        textField.selectable = false;
        textField.x = margin;
        textField.y = margin;
        textField.text = src;
        textField.width = size.x - 2 * margin;
        addChild(textField);
    }
}
}
